<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="common/head :: common_head">
    <title>秒杀列表页</title>
</head>
<body>

<div class="container">
    <div class="panel panel-default">
        <div class="panel-heading text-center">
            <h1>秒杀列表</h1>
        </div>
        <div class="panel-body">
            <table class="table table-hover">
                <thead>
                <tr>
                    <th>名称</th>
                    <th>库存</th>
                    <th>开始时间</th>
                    <th>结束时间</th>
                    <th>创建时间</th>
                    <th>详情页</th>
                </tr>
                </thead>
                <tbody>
                <tr th:each="sk:${list}">
                    <td th:text="${sk.name}"></td>
                    <td th:text="${sk.number}"></td>
                    <td th:text="${#dates.format(sk.startTime, 'yyyy-MM-dd HH:mm:ss')}"></td>
                    <td th:text="${#dates.format(sk.endTime, 'yyyy-MM-dd HH:mm:ss')}"></td>
                    <td th:text="${#dates.format(sk.createTime, 'yyyy-MM-dd HH:mm:ss')}"></td>
                    <td>
                        <a class="btn btn-info" th:href="@{/seckill/{secKillId}/detail(secKillId = ${sk.seckillId})}"
                           target="_blank">link</a>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>

</body>
<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
<script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</html>
